home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 44
/
Aminet 44 (2001)(GTI - Schatztruhe)[!][Aug 2001].iso
/
Aminet
/
comm
/
mail
/
YAM23src.lha
/
Source
/
extrasrc
/
stcgfn.c
< prev
next >
Wrap
C/C++ Source or Header
|
2000-12-15
|
353b
|
20 lines
#include <string.h>
#include "extra.h"
/* Get the base name. */
int stcgfn(char *node, const char *name)
{
const char *p = name + strlen(name);
const char *q = p;
while (p > name && p[-1] != '/' && p[-1] != ':')
--p;
if (q - p < FNSIZE)
{
memcpy(node, p, q - p + 1);
return q - p;
}
*node = '\0';
return 0;
}